@extends('template')
@section('css')
    <style>
        #J_Progress{
            width: 150px;
            height: 150px;
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            margin: auto;
        }
    </style>
@stop
@section('content')
    <div class="progress-bar" id="J_Progress">
        <div class="progressbar-content">0%</div>
    </div>
@stop
@section('js')
    <script>
        !function ($) {
            //开始加载进度条
            $('#J_Progress').progressBar({
                type: 'circle',
                strokeWidth: 2,
                strokeColor: '#B2B2B2',
                trailWidth: 2,
                trailColor: '#FF3030',
                fill: '#FFF',
                progress: 0,
            });
            var num = 0;
            var set = setInterval(function () {
                if (num<10){
                    num++;
                    num == 10 ? '1' :'.'+num;
                    $('#J_Progress').progressBar('set',num);
                    $('#J_Progress').find('div').html(num+'0%');
                }else {
                    window.location.href="{{route('home')}}";
                    clearInterval(set);
                }
            },100);
        }(jQuery);
    </script>
@stop
